Google Glass Programming in PHP by Tony Gaitatzis

Google Glass Programming in PHP by Tony Gaitatzis

Author:Tony Gaitatzis [Gaitatzis, Tony]
Language: eng
Format: azw3
Published: 2014-01-21T05:00:00+00:00


When that happens you will get a row in your HttpPost table containing this content: {

"collection": "timeline",

"itemId": "cc4bf15e-370d-4ebf-a2f3-1f1282623029", "operation": "UPDATE",

"userToken": "whoami",

"userActions": [

{

"type": "CUSTOM",

"payload": "like"

}

]

} // we will never see this page in person, // so let's save it to

// the database so we can check on it later $query = "insert into `HttpPost` ".

"( `url`, `headers`, `post` ) ". " values ".

"('".$url."','".addslashes($header).",'".addslashes($pos tString)."')";

$mysqli->query($query);

It is important to note here that PHP’s $_POST variable doesn’t process the incoming JSON. As a result, $_POST is empty even though Google Mirror has posted content to your timeline_callback.php script. To access the JSON, you must use the $HTTP_RAW_POST_DATA to access this JSON string.

Once this process is complete, you may choose to respond by posting content to their Glass Timeline or some other action.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.